/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
}

body {
  font-family: "微软雅黑", Arial, sans-serif;
  line-height: 1.6;
  background-color: #f5f5f5;
  color: #333;
}

/* 容器样式 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header 区域 */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fff;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
}

header img {
  max-width: 100%;
  height: auto;
}

header h1 {
  font-size: 24px;
  margin-top: 15px;
  color: #007bff;
}

/* 修改后的 Header 左侧导航 */
nav.header-nav-left {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
  gap: 15px;
  margin-top: 20px;
}

nav.header-nav-left ul {
  display: flex;
  gap: 15px;
}

nav.header-nav-left ul li {
  position: relative;
}

nav.header-nav-left ul li a {
  text-decoration: none;
  color: #007bff;
  padding: 5px 10px;
  transition: color 0.3s;
}

nav.header-nav-left ul li a:hover {
  color: #0056b3;
}

/* 子菜单的样式 */
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 200px;
  padding: 10px;
}

.sub-menu li {
  margin: 5px 0;
}

.sub-menu li a {
  color: #007bff;
  padding: 5px 10px;
}

.sub-menu li a:hover {
  color: #0056b3;
}

/* Header 右侧导航 */
nav.header-nav-right {
  position: absolute;
  right: 20px;
  top: 20px;
}

nav.header-nav-right ul {
  display: flex;
  gap: 10px;
}

nav.header-nav-right ul li {
  list-style: none;
}

nav.header-nav-right ul li a {
  text-decoration: none;
  color: #007bff;
  padding: 5px 10px;
  transition: color 0.3s;
}

nav.header-nav-right ul li a:hover {
  color: #0056b3;
}

/* Main 内容区域 */
main {
  background-color: #fff;
  margin-top: 20px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

section {
  margin-bottom: 40px;
}

section h2 {
  font-size: 20px;
  color: #333;
  border-left: 5px solid #007bff;
  padding-left: 10px;
  margin-bottom: 20px;
}
/* 新闻文章布局调整 */
#news, #announcements {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#news article, #announcements article {
  display: flex;
  align-items: flex-start;
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

#news article:hover, #announcements article:hover {
  transform: translateY(-5px);
}

#news article img {
  width: 200px;
  height: auto;
  margin-right: 15px;
  border-radius: 5px;
}

#news article h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #0044cc;
}

#news article p {
  font-size: 14px;
  color: #555;
}

/* 通知公告布局调整 */
#announcements article {
  display: flex;
  flex-direction: column;
  padding: 15px;
}

#announcements h3 {
  font-size: 16px;
  color: #007bff;
  margin-bottom: 10px;
}

#announcements h3 a {
  text-decoration: none;
  color: #007bff;
}

#announcements time {
  font-size: 12px;
  color: #888;
  margin-top: 5px;
}

/* 新增链接部分样式 */
#links-section {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
}

.link-item {
  width: calc(33.333% - 20px);
  background-color: #f0f0f0;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.link-item:hover {
  transform: translateY(-5px);
}

.link-item img {
  width: 100%;
  height: auto;
}

.text-overlay {
  padding: 10px;
  text-align: center;
  background-color: #007bff;
  color: #fff;
}

.text-overlay span {
  display: block;
  font-size: 16px;
  font-weight: bold;
}

.text-overlay p {
  font-size: 14px;
}

/* Footer 区域 */
footer {
  background-color: #333;
  color: #fff;
  padding: 20px;
  text-align: center;
  margin-top: 40px;
}

footer p {
  margin-bottom: 10px;
}

footer nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

footer nav ul li a {
  color: #bbb;
  text-decoration: none;
  transition: color 0.3s;
}

footer nav ul li a:hover {
  color: #fff;
}

/* 响应式布局 */
@media screen and (max-width: 768px) {
  nav.header-nav-left {
      flex-direction: column;
      align-items: center;
  }

  #links-section {
      flex-direction: column;
  }

 .link-item {
      width: 100%;
  }

  #news article, #announcements article {
      flex-direction: column;
      align-items: flex-start;
  }

  #news article img {
      width: 100%;
      margin-bottom: 15px;
  }
}

/* 表单与输入框样式 */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

form input[type="text"], form input[type="password"], form input[type="email"], form textarea {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

form input[type="submit"] {
  background-color: #007bff;
  color: #fff;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

form input[type="submit"]:hover {
  background-color: #0056b3;
}

form input[type="submit"]:disabled {
  background-color: #ddd;
  cursor: not-allowed;
}
